home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
os2
/
faxd_07.zip
/
READ.ME
< prev
next >
Wrap
Text File
|
1997-03-19
|
11KB
|
272 lines
Version 03 19 March 97
DISCLAIMER
I am not a programmer and make no representations or warranties about these
programs. I wrote them for myself and use them myself without problems. You
may use them entirely at your own risk. I have used the names of various
commercial products in this read.me file. They are trademarks of the firms
that release them.
LIMITATIONS
These are my first VXREXX applications. They are primitive and crude. There
are many improvements to be made -- over time. Right now, this project
stretched the limits of my abilities and the result gets the job done. Some
day I will build a phonebook thread to keep the phonebook sorted and up to
date. And some other features.
DESCRIPTION
I have a two line BrookTrout board and two line FaxWorks installation in my
office. I have been frustrated when on the road -- which is often -- with
the cost of sending faxes from hotels, especially overseas. Fax modems are
also not as reliable. So I wrote this package. It takes incoming files,
sends them as faxes and notifies me of their status. There are two parts at
the moment: FaxD.exe and FxFTP.
FAXD
The fax server can be any computer running Faxworks. You will probably
require a full time internet connection to make this work the way it is
intended.
The fax server runs FAXD.EXE from a directory, which is the Working
Directory. It searches that directory at intervals for any file of the
pattern *.env. If it finds one, it parses the information in that file and
posts the TIF or FAX file to FaxWorks. It then tries to detect the status
of that transaction and emails you of the result.
The FAXD.CFG file has to exist in the working directory for this program to
work. You can edit it using the System Editor.
There are four threads:
The main thread launches the other three and sends periodic instructions to
the two working threads to do their business. It also displays current
activities on the little program window.
The timer thread sends "ticks" to the main thread every ten seconds.
The Fax Redirection thread searches for *.env files when told to by the
parent thread. If it finds one, it parses it, deletes it and replaces it
with a file with the same name and the extension: .sts. It then adds the
file to the FaxWorks queue. If it is a TIF file, it adds it as an edited
file and then sends it. If the file is not in the working directory, the
complete path must be included. During this time it posts the file name it
is working on and the index number assigned by FaxWorks to the parent
thread for display. These are transient displays and are just for casual
monitoring and debugging.
The status thread is totally decoupled from the Redirection thread. It is
launched by the parent thread. It searches for any *.sts files in the
working directory. It then reads the file and looks at FaxWorks for the
job's status. FaxWorks REXX does not work entirely as documented under all
circumstances, so this part is still rough. If the status is "SENT" then it
goes into its notification phase. Otherwise, it tries to determine if the
status is a final one (no remaining resends) and sends out email
notification if it is. It also posts the job status and retry count to the
main thread for display. The status display items (bottom) and the two
redirection activity display items (top) are not directly related. The top
shows the CURRENT activity (with a one cycle persistence) of the
redirection thread, while the bottom does the same for the status thread.
They might be working on different jobs at any time.
FXFTP
FxFTP.EXE runs on the client (my notebook). It automatically creates the
envelope file and uploads it and the fax or tiff file that will be sent to
the target directory on the server. It uses the EWS package: TCPIP REXX FTP
API. YOU WILL NEED THAT TO RUN THIS PROGRAM. The file "RXFTP.DLL" ought to
be in your OS2/DLL subdirectory.
FxFTP is bi-threaded. The FTP process is a separate thread that
communicates to the main thread via REXX queues. If the FTP thread is busy
when a job is sent to it, the job remains in the queue until it is free.
You can continue using the main thread to create envelopes while the FTP
thread is sending. The FTP thread disables the QUIT button to prevent
interruptions. It also keeps the main thread informed about the file name
it is working on and how many jobs it has processed since it was launched.
FxFTP does nothing at all to change or move the fax or tiff file. It merely
creates a file with a random name and an "env." extension and puts it in
the dedicated directory on the client system. It then uploads via ftp that
file and the file it references. As it works now, it deletes the envelope
file on the client but leaves a copy of the file to send on the server. (A
future version will allow re-sending without re-uploading.) The server
script deletes the envelope file and replaces it with a status file -- or
else it would send it out forever.
The phonebook is a simple ASCII file. The name, company and faxphone must
be in that order and comma separated. If you leave out an item, put in the
comma! Do not use commas within a name, company name or phone number. After
writing in an entry, pushing the proper button adds it to the phonebook.
The SEND button does not work unless a file and recipient have been
selected. Selecting the "Cover Sheet?" Button adds a default cover sheet,
based on the server's setup. (A future version will allow customization.)
You can type up to 250 characters in the comment window. Do not use commas
or CRLF's as these may cause problems with Faxworks. (I am working on this
aspect.)
The FxFTP.CFG file has to exist in the working directory for this program
to work. You can edit it using the System Editor.
NOTIFICATION
Notifications are send via email with the subject: "FxReDirect Status". I
use a REXX script for PMMail on the client that detects these status
reports and, upon successful sending of the fax uses FTP REXX to delete the
fax or tiff file on the server updates a FxFTP log.
INSTALLATION
This package requires both RxFTP.DLL and the runtime VXREXX DLL to operate.
It also requires the RexxUtil functions.
Just create a directory like EFax or FXFTPfor the client software and FAXD
or FxReDirect for the server software. Put all the appropriate files in it.
Edit the config files. Good luck.
FAXD.CFG
To: xxx@yyy.zzz
From: aaa@bbb.ccc
d:\FaxWorks_directory
FaxWorks_Activity_Report
n
n
n
-a[f]
Lines one and two are the TO and FROM lines for email notification.
Line three is the complete path of the Faxworks installation on the sever.
Line four is the filename of the activity report in the FaxWorks directory.
I use activity.rpt. You set this up from Faxworks settings.
Line five is the number of total tries (retries plus 1) set in FaxWorks.
Line Six is for setting the interval for redirecting faxes. The number is
the number of ten second intervals the system waits to trigger the redirect
thread. So, a "6" means one minute. (I use a 3)
Line seven is the same for the notify thread. I use a longer period. (I use
a 7).
The last line allows you to configure the sendmail command for the version on
your system. My Warp 4 machines want '-a', my Warp 3 machine needs '-af'.
FXFTP.CFG
phonebook_name
d:\FxReDirect_on_server
d:\FaxWorks_directory
xxx.yyy.zzz
ftp_username
ftp_password
Line one is the name of the phonebook file in the working directory.
Line two is the complete path to the directory on the target server in
which envelope and fax files are to be sent via ftp.
Line three is the local FaxWorks Directory -- or any directory that you
want to be searched by default for files to send. (The program looks for
*.TIF and *.FAX files by default.)
Line four is the address (name or dotted IP address) of the server.
Lines five and six are your user name and password, respectively, on the
server for ftp.
ENVELOPE FILES
TO: SendToData
FROM: *,*,*,*
FILE:RemotePath\RemoteFile
INFO: Comment,*,FxReDirect,*,n
AT:
LOCALNAME: File2Fax
This is the exact format. Capitals ought to be used for the Tags, as in the
example.
SendtoData is in the expected Faxworks format: name,company,fax_number.
From is in the expected Faxworks format: yourname, yourcompany, yourphone,
yourfax. An "*" indicates that the server default is used. (FxFTP uses
these by default.)
The FILE: line tells the server where it is to find the FAX or TIF file to
send. If you upload the file to the same directory as the envelope file,
you still have to put the complete path in. Or, if the file already exists
on the server, you have to specify the path and file name.
INFO line is more Faxworks standard stuff. Comment is your comment. If it
is blank, keep the comma. n is a 0, 1 or 2. 2 means no cover sheet. 1 means
a full page cover sheet. 0 means a short cover sheet. The other two are to
set the BMP or CVR file for the cover sheet and to enable or disable the
fax header at the top of pages. The page header is in position two and the
cover sheet file designator is in position four.
AT line is the time and date to send. I usually leave it blank.
The last line is ignored by the server. It is merely to tell FxFTP what
file to upload to the server. It is added automatically by FxFTP but is not
required at the receiving end.
FTP INFO
As I said, I use the REXX FTP API in FxFTP. You could also use any FTP
client to transfer the file or files. The envelope should always go last --
for obvious reasons.
I use the Hethmon FTPD on the server. Any one should work. Your username
and password combination should give you put, get and delete access to the
target directory on the server.
The FAXD program does not care how files get into the directory. You could,
for example, email them to your server and have a REXX Exit move the FAX or
TIF file to the target directory and create an envelope file there. You
could then have your server log onto the Internet at Intervals and retrieve
mail.
COST
I feel guilty asking for money for something this crude. But, why should
you benefit from my hours of agony trying to figure out why my password
showed up as a directory name? Or why leaving the file name blank caused
another file to be sent? So this is charity honorware.
If you like it and intend to use it, send me money. Put a $20 bill (or a
$10 bill if you cannot afford that) or equivalent in an envelope and send
it to:
Chris Barr
PO Box 1661
Center Harbor, NH 03226
Indicate whether you want the money used towards:
A scholarship or
A political contribution.
If the former, it will go to pay for private schooling for a little boy in
the Caribbean. (Full disclosure: His parents, local island people, are
friends of mine. My wife and I are the boy's Godparents. He is extremely
bright and we want to help pay for his schooling at the "English School," a
very expensive school mostly attended by the children of American and
English expats.)
If the latter, it will go to the RNC. (I am a Republican.)
If you prefer not to pay, please do not use it for any commercial purpose
or for any purpose after 30 days.
EMAIL
I am cbarr@ibm.net. I cannot guarantee to answer.